From 1250459c7335d53f432f00d387f5af1b690ac6bd Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Mon, 23 Aug 2004 15:08:38 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.97 (412a08767NwPLKMuv2wKJw0mVgoNjg) 2.6 update_va_mapping on demand fault path (currently disabled) --- .../include/asm-xen/asm-i386/pgtable.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h b/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h index e1c2031a71..8da63ab5a4 100644 --- a/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h +++ b/linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgtable.h @@ -361,6 +361,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) */ #define update_mmu_cache(vma,address,pte) do { } while (0) #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS + +#if 1 #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ do { \ if (__dirty) { \ @@ -368,6 +370,21 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) flush_tlb_page(__vma, __address); \ } \ } while (0) +#else +#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ + do { \ + if (__dirty) { \ + if ( likely(vma->vm_mm == current->mm) ) { \ + xen_flush_page_update_queue(); \ + HYPERVISOR_update_va_mapping(address>>PAGE_SHIFT, entry, UVMF_INVLPG); \ + } else { \ + queue_l1_entry_update((__ptep), (__entry).pte_low); \ + xen_flush_page_update_queue(); \ + } \ + } \ + } while (0) + +#endif /* Encode and de-code a swap entry */ #define __swp_type(x) (((x).val >> 1) & 0x1f) -- 2.30.2